using Lzfy_Refund_Service.Models;

namespace Lzfy_Refund_Service.Services
{
    /// <summary>
    /// 退费流程服务接口
    /// </summary>
    public interface IRefundProcessService
    {
        /// <summary>
        /// 等待HIS退费处理
        /// 统一处理HIS数据库更新和验证码信息创建，确保数据一致性
        /// </summary>
        /// <param name="request">等待HIS退费请求</param>
        /// <returns>处理结果</returns>
        Task<WaitForHisRefundResponse> WaitForHisRefundAsync(WaitForHisRefundRequest request);

        /// <summary>
        /// 回滚HIS退费密码日志
        /// 当验证码信息创建失败时，删除已插入的HIS日志记录
        /// </summary>
        /// <param name="patientId">患者ID</param>
        /// <param name="modifyTime">修改时间</param>
        /// <returns>是否回滚成功</returns>
        Task<bool> RollbackHisRefundLogAsync(string patientId, DateTime modifyTime);
    }
}